﻿<Window x:Class="WMSSoft.WinKStart.Settings_SelectRegion"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:properties="clr-namespace:WMSSoft.WinKStart.Properties"
        xmlns:ext="clr-namespace:WMSSoft.WinKStart.Extension"
        x:Name="SettingsSelectRegion" 
        Title="{Binding ViewName}" Height="141" Width="300" ResizeMode="NoResize" ShowInTaskbar="False" WindowStartupLocation="CenterOwner"  WindowStyle="ToolWindow">
    <Grid Margin="10">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Label x:Name="lbl_SelectRegion" Content="{Binding ViewName}" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top"/>
        <ComboBox x:Name="cbx_SelectRegion" SelectedValue="{Binding SelectedRegion}" ItemsSource="{Binding Data}" DisplayMemberPath="Caption" SelectedValuePath="Name" Grid.Row="1"/>
        <Grid Margin="0,10,0,0" Grid.Row="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Button x:Name="btn_Ok" Content="{Binding Cmd_Apply.ViewName}" Grid.Column="0" Height="20" HorizontalAlignment="Right" Margin="0,0,5,0" Width="100" IsDefault="True" Command="{Binding Cmd_Apply.Command}"  CommandParameter="{Binding ElementName=SettingsSelectRegion}"/>
            <Button x:Name="btn_Close" Content="{Binding Cmd_Discard.ViewName}" Grid.Column="1" Height="20" HorizontalAlignment="Left" Margin="5,0,0,0" Width="100" IsCancel="True" Command="{Binding Cmd_Discard.Command}"  CommandParameter="{Binding ElementName=SettingsSelectRegion}"/>
        </Grid>

    </Grid>
</Window>
